#ifndef CLABELADDER_H_INCLUDED
#define CLABELADDER_H_INCLUDED

#include "LON.h"

/** CLabelAdder
Ultility Class to simplify adding labels for Irrlicht GUI Environment

This class does not hold any data for the label so it should be removed once
label is added.

Future implementation :
- Modify this adder into a data structure that holds multiple labels and
modifying value afterwards is possible.

- Make a adder template such that the adder does not only add IGUIStaticText
but any other gui type can be used.
**/

#define LABEL_VALUE_PADDING 10

class CLabelAdder
{
  public:
    //! Constructor
    //! \param env The Irrlich GUI Environment of the Irrlicht Device
    //! \param parent The parent of the labels'
    //! \param xStart Coordinate X of the starting position
    //! \param yStart Coordinate Y of the starting position
    //! \param labelWidth Width of the label
    //! \param valueWidth Width of the value
    CLabelAdder(IGUIEnvironment *env, IGUIElement *parent, u16 xStart, u16 yStart, u16 labelWidth, u16 valueWidth);
    ~CLabelAdder();

    //! Add a label to next line
    IGUIStaticText* addLabel(const wchar_t* label, const wchar_t* value = 0);

    IGUIStaticText* addLabel(const wchar_t* label, int value);

    void addSpace();

  private:
    IGUIEnvironment *env;
    IGUIElement *parent;

    u16 y, x1, x2, x3, x4;

    static SColor labelColor, valueColor;
};

#endif // CLABELADDER_H_INCLUDED
